package com.hps.demo.controller;

import com.hps.demo.entity.InfoUser;
import com.hps.demo.service.InfoUserService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author heps
 * @since 2020/8/15
 */
@Slf4j
@AllArgsConstructor
@RestController
public class IndexController {

  private InfoUserService infoUserService;

  @GetMapping("/getById")
  public InfoUser getById(String id) {
    log.info("根据ID查询用户信息:{}",id);
    return infoUserService.getInfoUserById(id);
  }
}
